using System;
using System.Reflection;
using System.Runtime.InteropServices;
using Kitware.mummy.Runtime;

namespace Kitware.VTK;

/// <summary>
///    vtkCookieCutter
/// </summary>
/// <remarks>
///    cut vtkPolyData defined on the 2D plane with one or more polygons
///
/// This filter crops an input vtkPolyData consisting of cells (i.e., points,
/// lines, polygons, and triangle strips) with trim loops specified by a second
/// input containing polygons and/or polylines. The input vtkPolyData and the
/// loops must lie on the same plane. Note that this filter can handle concave
/// polygons and/or loops. It may produce multiple output polygons for each
/// polygon/loop interaction. Similarly, it may produce multiple line segments
/// and so on. (The input to cookie cut (input0) is referred to as the input
/// mesh, while the loops used to cut the input mesh (input1) are referred to
/// as the trim loops.)
///
/// The filter has the option to pass through and generate point and cell
/// data.  If PassCellData is enabled, then the cell data associated with the
/// cropped cells, or cells passed through from the input mesh, are passed
/// through to the output. If PassPointData is enabled, then in similar
/// fashion the point data is passed through; however new points generated by
/// intersection may have point data interpolated in one of two ways. First,
/// the input mesh edges are interpolated at the new intersection points to
/// generate point data, or the trim loop edges are interpolated at the new
/// intersection points to generate point data. Note: for PassPointData and
/// point interpolation to function, the filter requires that the point data
/// attributes (from the mesh and trim loop) are exactly the same. If they are
/// not, then a set intersection operation is performed which uses the point
/// data arrays common to both the mesh and trim loops.
///
/// @warning
/// The mesh and trim loops must lie on the same plane and the plane may be
/// arbitrarily oriented. If not on the same plane, tolerancing issues can
/// produce erratic results.
///
/// </remarks>
/// <seealso>
///
/// vtkImprintFilter
/// </seealso>
public class vtkCookieCutter : vtkPolyDataAlgorithm
{
	/// <summary>
	/// Indicate whether point data from the input mesh are to be passed through
	/// and/or interpolated to the output mesh. By default, PassPointData is
	/// enabled. Note: both the input mesh points and the trim
	/// loops, must have identical point data. Otherwise, a set operation will
	/// be performed to process just the point data arrays common to both the
	/// mesh point data and loops point data.
	/// </summary>
	public enum PointInterpolationType
	{
		/// <summary>enum member</summary>
		USE_LOOP_EDGES = 1,
		/// <summary>enum member</summary>
		USE_MESH_EDGES = 0
	}

	/// <summary>
	/// Automatically generated type registration mechanics.
	/// </summary>
	public new const string MRFullTypeName = "Kitware.VTK.vtkCookieCutter";

	/// <summary>
	/// Automatically generated type registration mechanics.
	/// </summary>
	public new static readonly string MRClassNameKey;

	/// <summary>
	/// Automatically generated type registration mechanics.
	/// </summary>
	static vtkCookieCutter()
	{
		MRClassNameKey = "class vtkCookieCutter";
		Methods.RegisterType(Assembly.GetExecutingAssembly(), MRClassNameKey, Type.GetType("Kitware.VTK.vtkCookieCutter"));
	}

	/// <summary>
	/// Automatically generated constructor - called from generated code.
	/// DO NOT call directly.
	/// </summary>
	public vtkCookieCutter(IntPtr rawCppThis, bool callDisposalMethod, bool strong)
		: base(rawCppThis, callDisposalMethod, strong)
	{
	}

	[DllImport("Kitware.VTK.FiltersModeling.Unmanaged.dll", CallingConvention = CallingConvention.Cdecl)]
	internal static extern IntPtr vtkCookieCutter_New(ref uint mteStatus, ref uint mteIndex, ref uint rawRefCount);

	/// <summary>
	/// Standard methods to instantiate, print and provide type information.
	/// </summary>
	public new static vtkCookieCutter New()
	{
		vtkCookieCutter result = null;
		uint mteStatus = 0u;
		uint mteIndex = uint.MaxValue;
		uint rawRefCount = 0u;
		IntPtr intPtr = vtkCookieCutter_New(ref mteStatus, ref mteIndex, ref rawRefCount);
		if (IntPtr.Zero != intPtr)
		{
			result = (vtkCookieCutter)Methods.CreateWrappedObject(mteStatus, mteIndex, rawRefCount, intPtr, callDisposalMethod: true, out var _);
		}
		return result;
	}

	/// <summary>
	/// Standard methods to instantiate, print and provide type information.
	/// </summary>
	public vtkCookieCutter()
		: base(IntPtr.Zero, callDisposalMethod: false, strong: false)
	{
		uint mteStatus = 0u;
		uint mteIndex = uint.MaxValue;
		uint rawRefCount = 0u;
		IntPtr rawCppThis = vtkCookieCutter_New(ref mteStatus, ref mteIndex, ref rawRefCount);
		SetCppThis(rawCppThis, callDisposalMethod: true, (mteStatus != 0 && rawRefCount >= 2) ? true : false);
	}

	/// <summary>
	/// Automatically generated protected Dispose method - called from
	/// public Dispose or the C# destructor. DO NOT call directly.
	/// </summary>
	protected override void Dispose(bool disposing)
	{
		base.Dispose(disposing);
	}

	[DllImport("Kitware.VTK.FiltersModeling.Unmanaged.dll", CallingConvention = CallingConvention.Cdecl)]
	internal static extern void vtkCookieCutter_CreateDefaultLocator_01(HandleRef pThis);

	/// <summary>
	/// Create default locator. Used to create one when none is specified. The
	/// locator is used to merge coincident points.
	/// </summary>
	public void CreateDefaultLocator()
	{
		vtkCookieCutter_CreateDefaultLocator_01(GetCppThis());
	}

	[DllImport("Kitware.VTK.FiltersModeling.Unmanaged.dll", CallingConvention = CallingConvention.Cdecl)]
	internal static extern IntPtr vtkCookieCutter_GetLocator_02(HandleRef pThis, ref uint mteStatus, ref uint mteIndex, ref uint rawRefCount);

	/// <summary>
	/// Specify a spatial locator for merging points. By default, an
	/// instance of vtkMergePoints is used.
	/// </summary>
	public virtual vtkIncrementalPointLocator GetLocator()
	{
		vtkIncrementalPointLocator vtkIncrementalPointLocator2 = null;
		uint mteStatus = 0u;
		uint mteIndex = uint.MaxValue;
		uint rawRefCount = 0u;
		IntPtr intPtr = vtkCookieCutter_GetLocator_02(GetCppThis(), ref mteStatus, ref mteIndex, ref rawRefCount);
		if (IntPtr.Zero != intPtr)
		{
			vtkIncrementalPointLocator2 = (vtkIncrementalPointLocator)Methods.CreateWrappedObject(mteStatus, mteIndex, rawRefCount, intPtr, callDisposalMethod: true, out var found);
			if (found)
			{
				vtkIncrementalPointLocator2.Register(null);
			}
		}
		return vtkIncrementalPointLocator2;
	}

	[DllImport("Kitware.VTK.FiltersModeling.Unmanaged.dll", CallingConvention = CallingConvention.Cdecl)]
	internal static extern IntPtr vtkCookieCutter_GetLoops_03(HandleRef pThis, ref uint mteStatus, ref uint mteIndex, ref uint rawRefCount);

	/// <summary>
	/// Specify the a second vtkPolyData input which defines trim loops used to
	/// cut the input polygonal data. These loops must be manifold, i.e., do not
	/// self intersect. The loops are defined from the polygons and polylines
	/// defined in this second input.
	/// </summary>
	public vtkDataObject GetLoops()
	{
		vtkDataObject vtkDataObject2 = null;
		uint mteStatus = 0u;
		uint mteIndex = uint.MaxValue;
		uint rawRefCount = 0u;
		IntPtr intPtr = vtkCookieCutter_GetLoops_03(GetCppThis(), ref mteStatus, ref mteIndex, ref rawRefCount);
		if (IntPtr.Zero != intPtr)
		{
			vtkDataObject2 = (vtkDataObject)Methods.CreateWrappedObject(mteStatus, mteIndex, rawRefCount, intPtr, callDisposalMethod: true, out var found);
			if (found)
			{
				vtkDataObject2.Register(null);
			}
		}
		return vtkDataObject2;
	}

	[DllImport("Kitware.VTK.FiltersModeling.Unmanaged.dll", CallingConvention = CallingConvention.Cdecl)]
	internal static extern IntPtr vtkCookieCutter_GetLoopsConnection_04(HandleRef pThis, ref uint mteStatus, ref uint mteIndex, ref uint rawRefCount);

	/// <summary>
	/// Specify the a second vtkPolyData input which defines trim loops used to
	/// cut the input polygonal data. These loops must be manifold, i.e., do not
	/// self intersect. The loops are defined from the polygons and polylines
	/// defined in this second input. Note that if polylines are used, they are
	/// assumed to be closed.
	/// </summary>
	public vtkAlgorithmOutput GetLoopsConnection()
	{
		vtkAlgorithmOutput vtkAlgorithmOutput2 = null;
		uint mteStatus = 0u;
		uint mteIndex = uint.MaxValue;
		uint rawRefCount = 0u;
		IntPtr intPtr = vtkCookieCutter_GetLoopsConnection_04(GetCppThis(), ref mteStatus, ref mteIndex, ref rawRefCount);
		if (IntPtr.Zero != intPtr)
		{
			vtkAlgorithmOutput2 = (vtkAlgorithmOutput)Methods.CreateWrappedObject(mteStatus, mteIndex, rawRefCount, intPtr, callDisposalMethod: true, out var found);
			if (found)
			{
				vtkAlgorithmOutput2.Register(null);
			}
		}
		return vtkAlgorithmOutput2;
	}

	[DllImport("Kitware.VTK.FiltersModeling.Unmanaged.dll", CallingConvention = CallingConvention.Cdecl)]
	internal static extern long vtkCookieCutter_GetNumberOfGenerationsFromBase_05(HandleRef pThis, string type);

	/// <summary>
	/// Standard methods to instantiate, print and provide type information.
	/// </summary>
	public override long GetNumberOfGenerationsFromBase(string type)
	{
		return vtkCookieCutter_GetNumberOfGenerationsFromBase_05(GetCppThis(), type);
	}

	[DllImport("Kitware.VTK.FiltersModeling.Unmanaged.dll", CallingConvention = CallingConvention.Cdecl)]
	internal static extern long vtkCookieCutter_GetNumberOfGenerationsFromBaseType_06(string type);

	/// <summary>
	/// Standard methods to instantiate, print and provide type information.
	/// </summary>
	public new static long GetNumberOfGenerationsFromBaseType(string type)
	{
		return vtkCookieCutter_GetNumberOfGenerationsFromBaseType_06(type);
	}

	[DllImport("Kitware.VTK.FiltersModeling.Unmanaged.dll", CallingConvention = CallingConvention.Cdecl)]
	internal static extern byte vtkCookieCutter_GetPassCellData_07(HandleRef pThis);

	/// <summary>
	/// Indicate whether cell data from the input mesh is to be passed through
	/// to the output mesh. By default, PassCellData is enabled.
	/// </summary>
	public virtual bool GetPassCellData()
	{
		return (vtkCookieCutter_GetPassCellData_07(GetCppThis()) != 0) ? true : false;
	}

	[DllImport("Kitware.VTK.FiltersModeling.Unmanaged.dll", CallingConvention = CallingConvention.Cdecl)]
	internal static extern byte vtkCookieCutter_GetPassPointData_08(HandleRef pThis);

	/// <summary>
	/// Indicate whether point data from the input mesh are to be passed through
	/// and/or interpolated to the output mesh. By default, PassPointData is
	/// enabled. Note: both the input mesh points and the trim
	/// loops, must have identical point data. Otherwise, a set operation will
	/// be performed to process just the point data arrays common to both the
	/// mesh point data and loops point data.
	/// </summary>
	public virtual bool GetPassPointData()
	{
		return (vtkCookieCutter_GetPassPointData_08(GetCppThis()) != 0) ? true : false;
	}

	[DllImport("Kitware.VTK.FiltersModeling.Unmanaged.dll", CallingConvention = CallingConvention.Cdecl)]
	internal static extern int vtkCookieCutter_GetPointInterpolation_09(HandleRef pThis);

	/// <summary>
	/// If PassPointData is on, indicate how new point data is to generated at
	/// the intersection points between the input mesh edges and the trim edges
	/// (trim edges form the loops). By default, PointInterpolation is set to
	/// USE_MESH_EDGES.
	/// </summary>
	public virtual int GetPointInterpolation()
	{
		return vtkCookieCutter_GetPointInterpolation_09(GetCppThis());
	}

	[DllImport("Kitware.VTK.FiltersModeling.Unmanaged.dll", CallingConvention = CallingConvention.Cdecl)]
	internal static extern int vtkCookieCutter_GetPointInterpolationMaxValue_10(HandleRef pThis);

	/// <summary>
	/// If PassPointData is on, indicate how new point data is to generated at
	/// the intersection points between the input mesh edges and the trim edges
	/// (trim edges form the loops). By default, PointInterpolation is set to
	/// USE_MESH_EDGES.
	/// </summary>
	public virtual int GetPointInterpolationMaxValue()
	{
		return vtkCookieCutter_GetPointInterpolationMaxValue_10(GetCppThis());
	}

	[DllImport("Kitware.VTK.FiltersModeling.Unmanaged.dll", CallingConvention = CallingConvention.Cdecl)]
	internal static extern int vtkCookieCutter_GetPointInterpolationMinValue_11(HandleRef pThis);

	/// <summary>
	/// If PassPointData is on, indicate how new point data is to generated at
	/// the intersection points between the input mesh edges and the trim edges
	/// (trim edges form the loops). By default, PointInterpolation is set to
	/// USE_MESH_EDGES.
	/// </summary>
	public virtual int GetPointInterpolationMinValue()
	{
		return vtkCookieCutter_GetPointInterpolationMinValue_11(GetCppThis());
	}

	[DllImport("Kitware.VTK.FiltersModeling.Unmanaged.dll", CallingConvention = CallingConvention.Cdecl)]
	internal static extern int vtkCookieCutter_IsA_12(HandleRef pThis, string type);

	/// <summary>
	/// Standard methods to instantiate, print and provide type information.
	/// </summary>
	public override int IsA(string type)
	{
		return vtkCookieCutter_IsA_12(GetCppThis(), type);
	}

	[DllImport("Kitware.VTK.FiltersModeling.Unmanaged.dll", CallingConvention = CallingConvention.Cdecl)]
	internal static extern int vtkCookieCutter_IsTypeOf_13(string type);

	/// <summary>
	/// Standard methods to instantiate, print and provide type information.
	/// </summary>
	public new static int IsTypeOf(string type)
	{
		return vtkCookieCutter_IsTypeOf_13(type);
	}

	[DllImport("Kitware.VTK.FiltersModeling.Unmanaged.dll", CallingConvention = CallingConvention.Cdecl)]
	internal static extern IntPtr vtkCookieCutter_NewInstance_15(HandleRef pThis, ref uint mteStatus, ref uint mteIndex, ref uint rawRefCount);

	/// <summary>
	/// Standard methods to instantiate, print and provide type information.
	/// </summary>
	public new vtkCookieCutter NewInstance()
	{
		vtkCookieCutter result = null;
		uint mteStatus = 0u;
		uint mteIndex = uint.MaxValue;
		uint rawRefCount = 0u;
		IntPtr intPtr = vtkCookieCutter_NewInstance_15(GetCppThis(), ref mteStatus, ref mteIndex, ref rawRefCount);
		if (IntPtr.Zero != intPtr)
		{
			result = (vtkCookieCutter)Methods.CreateWrappedObject(mteStatus, mteIndex, rawRefCount, intPtr, callDisposalMethod: true, out var _);
		}
		return result;
	}

	[DllImport("Kitware.VTK.FiltersModeling.Unmanaged.dll", CallingConvention = CallingConvention.Cdecl)]
	internal static extern void vtkCookieCutter_PassCellDataOff_16(HandleRef pThis);

	/// <summary>
	/// Indicate whether cell data from the input mesh is to be passed through
	/// to the output mesh. By default, PassCellData is enabled.
	/// </summary>
	public virtual void PassCellDataOff()
	{
		vtkCookieCutter_PassCellDataOff_16(GetCppThis());
	}

	[DllImport("Kitware.VTK.FiltersModeling.Unmanaged.dll", CallingConvention = CallingConvention.Cdecl)]
	internal static extern void vtkCookieCutter_PassCellDataOn_17(HandleRef pThis);

	/// <summary>
	/// Indicate whether cell data from the input mesh is to be passed through
	/// to the output mesh. By default, PassCellData is enabled.
	/// </summary>
	public virtual void PassCellDataOn()
	{
		vtkCookieCutter_PassCellDataOn_17(GetCppThis());
	}

	[DllImport("Kitware.VTK.FiltersModeling.Unmanaged.dll", CallingConvention = CallingConvention.Cdecl)]
	internal static extern void vtkCookieCutter_PassPointDataOff_18(HandleRef pThis);

	/// <summary>
	/// Indicate whether point data from the input mesh are to be passed through
	/// and/or interpolated to the output mesh. By default, PassPointData is
	/// enabled. Note: both the input mesh points and the trim
	/// loops, must have identical point data. Otherwise, a set operation will
	/// be performed to process just the point data arrays common to both the
	/// mesh point data and loops point data.
	/// </summary>
	public virtual void PassPointDataOff()
	{
		vtkCookieCutter_PassPointDataOff_18(GetCppThis());
	}

	[DllImport("Kitware.VTK.FiltersModeling.Unmanaged.dll", CallingConvention = CallingConvention.Cdecl)]
	internal static extern void vtkCookieCutter_PassPointDataOn_19(HandleRef pThis);

	/// <summary>
	/// Indicate whether point data from the input mesh are to be passed through
	/// and/or interpolated to the output mesh. By default, PassPointData is
	/// enabled. Note: both the input mesh points and the trim
	/// loops, must have identical point data. Otherwise, a set operation will
	/// be performed to process just the point data arrays common to both the
	/// mesh point data and loops point data.
	/// </summary>
	public virtual void PassPointDataOn()
	{
		vtkCookieCutter_PassPointDataOn_19(GetCppThis());
	}

	[DllImport("Kitware.VTK.FiltersModeling.Unmanaged.dll", CallingConvention = CallingConvention.Cdecl)]
	internal static extern IntPtr vtkCookieCutter_SafeDownCast_20(HandleRef o, ref uint mteStatus, ref uint mteIndex, ref uint rawRefCount);

	/// <summary>
	/// Standard methods to instantiate, print and provide type information.
	/// </summary>
	public new static vtkCookieCutter SafeDownCast(vtkObjectBase o)
	{
		vtkCookieCutter vtkCookieCutter2 = null;
		uint mteStatus = 0u;
		uint mteIndex = uint.MaxValue;
		uint rawRefCount = 0u;
		IntPtr intPtr = vtkCookieCutter_SafeDownCast_20(o?.GetCppThis() ?? default(HandleRef), ref mteStatus, ref mteIndex, ref rawRefCount);
		if (IntPtr.Zero != intPtr)
		{
			vtkCookieCutter2 = (vtkCookieCutter)Methods.CreateWrappedObject(mteStatus, mteIndex, rawRefCount, intPtr, callDisposalMethod: true, out var found);
			if (found)
			{
				vtkCookieCutter2.Register(null);
			}
		}
		return vtkCookieCutter2;
	}

	[DllImport("Kitware.VTK.FiltersModeling.Unmanaged.dll", CallingConvention = CallingConvention.Cdecl)]
	internal static extern void vtkCookieCutter_SetLocator_21(HandleRef pThis, HandleRef locator);

	/// <summary>
	/// Specify a spatial locator for merging points. By default, an
	/// instance of vtkMergePoints is used.
	/// </summary>
	public void SetLocator(vtkIncrementalPointLocator locator)
	{
		vtkCookieCutter_SetLocator_21(GetCppThis(), locator?.GetCppThis() ?? default(HandleRef));
	}

	[DllImport("Kitware.VTK.FiltersModeling.Unmanaged.dll", CallingConvention = CallingConvention.Cdecl)]
	internal static extern void vtkCookieCutter_SetLoopsConnection_22(HandleRef pThis, HandleRef algOutput);

	/// <summary>
	/// Specify the a second vtkPolyData input which defines trim loops used to
	/// cut the input polygonal data. These loops must be manifold, i.e., do not
	/// self intersect. The loops are defined from the polygons and polylines
	/// defined in this second input. Note that if polylines are used, they are
	/// assumed to be closed.
	/// </summary>
	public void SetLoopsConnection(vtkAlgorithmOutput algOutput)
	{
		vtkCookieCutter_SetLoopsConnection_22(GetCppThis(), algOutput?.GetCppThis() ?? default(HandleRef));
	}

	[DllImport("Kitware.VTK.FiltersModeling.Unmanaged.dll", CallingConvention = CallingConvention.Cdecl)]
	internal static extern void vtkCookieCutter_SetLoopsData_23(HandleRef pThis, HandleRef loops);

	/// <summary>
	/// Specify the a second vtkPolyData input which defines trim loops used to
	/// cut the input polygonal data. These loops must be manifold, i.e., do not
	/// self intersect. The loops are defined from the polygons and polylines
	/// defined in this second input.
	/// </summary>
	public void SetLoopsData(vtkDataObject loops)
	{
		vtkCookieCutter_SetLoopsData_23(GetCppThis(), loops?.GetCppThis() ?? default(HandleRef));
	}

	[DllImport("Kitware.VTK.FiltersModeling.Unmanaged.dll", CallingConvention = CallingConvention.Cdecl)]
	internal static extern void vtkCookieCutter_SetPassCellData_24(HandleRef pThis, byte _arg);

	/// <summary>
	/// Indicate whether cell data from the input mesh is to be passed through
	/// to the output mesh. By default, PassCellData is enabled.
	/// </summary>
	public virtual void SetPassCellData(bool _arg)
	{
		vtkCookieCutter_SetPassCellData_24(GetCppThis(), (byte)(_arg ? 1u : 0u));
	}

	[DllImport("Kitware.VTK.FiltersModeling.Unmanaged.dll", CallingConvention = CallingConvention.Cdecl)]
	internal static extern void vtkCookieCutter_SetPassPointData_25(HandleRef pThis, byte _arg);

	/// <summary>
	/// Indicate whether point data from the input mesh are to be passed through
	/// and/or interpolated to the output mesh. By default, PassPointData is
	/// enabled. Note: both the input mesh points and the trim
	/// loops, must have identical point data. Otherwise, a set operation will
	/// be performed to process just the point data arrays common to both the
	/// mesh point data and loops point data.
	/// </summary>
	public virtual void SetPassPointData(bool _arg)
	{
		vtkCookieCutter_SetPassPointData_25(GetCppThis(), (byte)(_arg ? 1u : 0u));
	}

	[DllImport("Kitware.VTK.FiltersModeling.Unmanaged.dll", CallingConvention = CallingConvention.Cdecl)]
	internal static extern void vtkCookieCutter_SetPointInterpolation_26(HandleRef pThis, int _arg);

	/// <summary>
	/// If PassPointData is on, indicate how new point data is to generated at
	/// the intersection points between the input mesh edges and the trim edges
	/// (trim edges form the loops). By default, PointInterpolation is set to
	/// USE_MESH_EDGES.
	/// </summary>
	public virtual void SetPointInterpolation(int _arg)
	{
		vtkCookieCutter_SetPointInterpolation_26(GetCppThis(), _arg);
	}

	[DllImport("Kitware.VTK.FiltersModeling.Unmanaged.dll", CallingConvention = CallingConvention.Cdecl)]
	internal static extern void vtkCookieCutter_SetPointInterpolationToLoopEdges_27(HandleRef pThis);

	/// <summary>
	/// If PassPointData is on, indicate how new point data is to generated at
	/// the intersection points between the input mesh edges and the trim edges
	/// (trim edges form the loops). By default, PointInterpolation is set to
	/// USE_MESH_EDGES.
	/// </summary>
	public void SetPointInterpolationToLoopEdges()
	{
		vtkCookieCutter_SetPointInterpolationToLoopEdges_27(GetCppThis());
	}

	[DllImport("Kitware.VTK.FiltersModeling.Unmanaged.dll", CallingConvention = CallingConvention.Cdecl)]
	internal static extern void vtkCookieCutter_SetPointInterpolationToMeshEdges_28(HandleRef pThis);

	/// <summary>
	/// If PassPointData is on, indicate how new point data is to generated at
	/// the intersection points between the input mesh edges and the trim edges
	/// (trim edges form the loops). By default, PointInterpolation is set to
	/// USE_MESH_EDGES.
	/// </summary>
	public void SetPointInterpolationToMeshEdges()
	{
		vtkCookieCutter_SetPointInterpolationToMeshEdges_28(GetCppThis());
	}
}
